/* ==================================================
   LEXIQUE (page lexique.html)
================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #172033;
    background-color: #f5f8fc;
}

/* ---------- 1. Bannière + recherche ---------- */

.lexique_banniere {
    padding: 55px 7% 60px;
    text-align: center;
    background: linear-gradient(135deg, #102d55 0%, #176b38 100%);
    color: #ffffff;
}

.lexique_surtitre {
    margin-bottom: 10px;
    color: #a8e6b7;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 2px;
}

.lexique_banniere h1 {
    margin-bottom: 14px;
    font-size: clamp(30px, 4.5vw, 46px);
    line-height: 1.2;
}

.lexique_banniere > p {
    max-width: 620px;
    margin: 0 auto;
    color: #e1e9f3;
    font-size: 16px;
    line-height: 1.8;
}

.lexique_recherche {
    max-width: 600px;
    margin: 28px auto 0;
}

.lexique_recherche input {
    width: 100%;
    padding: 15px 20px 15px 52px;

    font-family: inherit;
    font-size: 16px;
    color: #172033;

    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23176b38' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 20px center;

    border: 2px solid transparent;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);

    transition: border-color 0.3s ease;
}

.lexique_recherche input:focus {
    outline: none;
    border-color: #8cdda0;
}

.lexique_compteur {
    margin-top: 14px;
    color: #cfe9d6;
    font-size: 14px;
}


/* ---------- 2. Barre des lettres A-Z ---------- */

.lexique_alphabet {
    position: sticky;
    top: 0;
    z-index: 5;

    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;

    padding: 12px 5%;

    background-color: #ffffff;
    border-bottom: 1px solid #e5ebf2;
    box-shadow: 0 4px 12px rgba(20, 45, 80, 0.06);
}

.lexique_alphabet a {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    border-radius: 8px;

    color: #102d55;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;

    transition: background-color 0.2s ease, color 0.2s ease;
}

.lexique_alphabet a:hover {
    background-color: #176b38;
    color: #ffffff;
}

.lexique_alphabet a.inactif {
    color: #c3ccd8;
    cursor: default;
    pointer-events: none;
}


/* ---------- 3. Liste des termes ---------- */

.lexique_contenu {
    max-width: 860px;
    margin: 0 auto;
    padding: 30px 5% 70px;
}

.lexique_groupe {
    scroll-margin-top: 70px;
    margin-bottom: 28px;
}

.lexique_lettre {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 14px;

    color: #176b38;
    font-size: 28px;
}

.lexique_lettre::after {
    content: "";
    flex: 1;
    height: 2px;
    background-color: #dbe7df;
}

.lexique_carte {
    margin-bottom: 12px;
    padding: 18px 22px;

    background-color: #ffffff;
    border: 1px solid #e5ebf2;
    border-left: 4px solid #176b38;
    border-radius: 10px;

    box-shadow: 0 3px 10px rgba(20, 45, 80, 0.05);
}

.lexique_carte h3 {
    margin-bottom: 6px;
    color: #102d55;
    font-size: 18px;
}

.lexique_carte p {
    color: #4d596c;
    font-size: 15px;
    line-height: 1.8;
}

.lexique_carte mark {
    padding: 0 2px;
    background-color: #d9f0b8;
    color: inherit;
    border-radius: 3px;
}

.lexique_source {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;

    background-color: #eaf5ed;
    border-radius: 20px;

    color: #176b38;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;

    transition: background-color 0.2s ease;
}

.lexique_source:hover {
    background-color: #d3ebd9;
}

.lexique_vide {
    padding: 40px 20px;
    text-align: center;
    color: #687386;
}

.lexique_vide[hidden] {
    display: none;
}


/* ---------- 4. Téléphones ---------- */

@media screen and (max-width: 600px) {

    .lexique_banniere {
        padding: 40px 20px 45px;
    }

    .lexique_alphabet {
        gap: 2px;
        padding: 8px 3%;
    }

    .lexique_alphabet a {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }

    .lexique_carte {
        padding: 16px;
    }
}


/* ==================================================
   5. AJOUTS : catégories, anglais, voir aussi
================================================== */

/* Menu de filtre par catégorie (sous la barre de recherche) */
.lexique_categorie {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px 18px;

    font-family: inherit;
    font-size: 15px;
    color: #102d55;

    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: 50px;
    cursor: pointer;
}

.lexique_categorie:focus {
    outline: none;
    border-color: #8cdda0;
}

/* Équivalent anglais, à côté du terme */
.lexique_anglais {
    margin-left: 10px;
    padding: 2px 9px;

    background-color: #eef2f7;
    border-radius: 12px;

    color: #647084;
    font-size: 12px;
    font-weight: normal;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

/* Voir aussi */
.lexique_voir {
    margin-top: 10px;
    color: #687386;
    font-size: 14px;
}

.lexique_voir a {
    margin-left: 8px;
    color: #176b38;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px dashed #176b38;
}

.lexique_voir a:hover {
    color: #0c4825;
}

/* Pied de carte : catégorie + lien vers le cours */
.lexique_pied {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.lexique_pied .lexique_source {
    margin-top: 0;
}

.lexique_cat {
    padding: 4px 12px;
    background-color: #f0f3f7;
    border-radius: 20px;
    color: #647084;
    font-size: 12px;
}

/* Éclair quand on arrive sur un terme via "Voir aussi" */
.lexique_flash {
    animation: eclair 1.8s ease;
}

@keyframes eclair {
    0%, 60% { box-shadow: 0 0 0 4px rgba(23, 107, 56, 0.45); }
    100%    { box-shadow: 0 3px 10px rgba(20, 45, 80, 0.05); }
}
